package com.example.chapp.control;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;

import androidx.annotation.Nullable;

import com.example.chapp.R;


import java.util.ArrayList;
import java.util.List;

public class course3active extends Activity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.course3);
        List<String> data=new ArrayList();
        for (int i=0;i<4;i++){
            data.add("第一课：安卓开发基础");
        }
        c3list c3list=new c3list(data,course3active.this);
        ListView listView=findViewById(R.id.c3list);
        listView.setAdapter(c3list);

        View but1=findViewById(R.id.sy);
        but1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(course3active.this, shouyeactive.class);
                startActivity(intent);
            }
        });
        View but2=findViewById(R.id.wd);
        but2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(course3active.this, wodeactive.class);
                startActivity(intent);
            }
        });
        View a2=findViewById(R.id.a2);
        a2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(course3active.this, course2active.class);
                startActivity(intent);
            }
        });
        View a1=findViewById(R.id.a1);
        a1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(course3active.this, course1active.class);
                startActivity(intent);
            }
        });
        View a4=findViewById(R.id.a4);
        a4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(course3active.this, course4active.class);
                startActivity(intent);
            }
        });
    }
}
